Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-milestone is "x-send-event">
With this node you can send an event to the event server and trigger an Alarm with the possibility to activate a rule associated with it.
A JSON with these parameters:
A JSON object with these parameters:
{
message: "OK Event sent correctly"
}
{
message: "Connection error: TypeError[ERR_INVALID_URL]:Invalid URL:http://wrongaddress:9090"
}
The node can receive the parameters described in the Inputs section, with them generates a XML file readable from the event server, and with server response generates the output JSON. If the values are not present in the input JSON, these are read by those in the node properties. If they are not present in either part or are wrong, an error is generated for the necessary parameters or the reason why are not correct.